package ua.tach.shortl;

import java.io.InputStream;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Mesh;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.Texture.TextureFilter;
import com.badlogic.gdx.graphics.g3d.loaders.ModelLoader;

public class Loader {
	public Mesh m;
	public Texture tx;
	
	public Loader (String s) {
		try {
			InputStream in = Gdx.files.internal("data/" + s + ".obj" ).read();
			m = ModelLoader.loadObj(in);
			in.close();
			tx = new Texture(Gdx.files.internal("data/" + s + ".png"), true);
			tx.setFilter(TextureFilter.MipMap, TextureFilter.Linear);
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

}
